import request from '@/utils/request'
import { getXSRFToken } from '@/utils/auth'
export function taskUpload(data) {
  return request({
    url: '/utils/upload',
    method: 'post',
    data
  })
}
export function getCaptcha(params) {
  return request({
    url: '/api/captcha',
    method: 'get',
    params
  })
}
export function getCode(data) {
  return request({
    url: '/api/user/send-sms-code',
    method: 'post',
    data
  })
}
export function subTaskExport(params) {
  return request({
    url: '/api/sub-task/export',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
export function aggregateExport(params) {
  return request({
    url: '/api/aggregate-report/export',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
export function getCookie(params) {
  return request({
    url: '/sanctum/csrf-cookie',
    method: 'get',
    params
  })
}
export function aggregateFixExport(params) {
  return request({
    url: '/api/aggregate-fix-report/export',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
